package com.ioc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class Father {

    @Autowired  //对类成员变量、方法及构造函数进行标注，完成自动装配的工作
    private Son son;

    @Autowired
    @Qualifier("aaa")
    private Son _son;

    public void go(){
        son.eat();
    }

}
